package com.zking.service.impl;

import com.zking.entity.Users;
import com.zking.service.UsersService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UsersServiceImpl extends BaseServiceImpl<Users> implements UsersService {

    @Override
    public boolean checkUsername(String username) {
        Users u = new Users();
        u.setUsername(username);
        // select * from users where username=?
        return mapper.selectOne(u) != null;
    }
}
